package com.chinasofti.tcp;

import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;

public class ClientDemo {
    public static void main(String[] args) throws IOException {
        //创建客户端socket对象
        Socket s = new Socket("127.0.0.1",10000);
        //输出流，写数据
        OutputStream os = s.getOutputStream();
        os.write("hello  tcp!".getBytes());

        s.close();
    }
}
